Debug wall collisions and particle state writing - #1745
Conversation
…s and collision check upper boundary
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1745 +/- ##
==========================================
+ Coverage 61.67% 61.71% +0.04%
==========================================
Files 84 84
Lines 21619 21642 +23
Branches 3196 3196
==========================================
+ Hits 13334 13357 +23
Misses 6093 6093
Partials 2192 2192 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@sbryngelson I am pretty sure that this is not an issue with the branch, and I am beginning to have several branches all with scattered fixes to various things that I have been working on. Do we think that this is something to do with errors on the Phoenix runners, or have they been running successfully for others? Should I get on Phoenix and resolve this? |
Thanks for letting me know. I am desperately trying to fix everything, as runner behavior changed again. Your code is probably fine. |
Lines of Code
|
There was a problem hiding this comment.
Pull request overview
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Fixes GPU boundary-condition data synchronization for slip-wall collisions and corrects post-process IB state output when immersed boundaries are created exclusively from particle clouds.
Changes:
- Sync
ib_bc_*%endvalues to the GPU so slip-wall boundary handling is correct on all domain sides. - Broadcast/initialize particle-cloud metadata in post-process and include particle-cloud IB counts when sizing/reading IB-state outputs.
- Update parameter definitions to classify
num_particle_clouds/particle_cloudas pre-simulation inputs.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| toolchain/mfc/params/definitions.py | Moves particle-cloud params into the pre-sim namelist set so they are recognized appropriately. |
| src/simulation/m_ibm.fpp | Updates GPU data synchronization to include ib_bc_*%end boundary values. |
| src/simulation/m_global_parameters.fpp | Declares GPU storage for ib_bc_*%end so the new GPU updates are valid. |
| src/simulation/m_collisions.fpp | Removes a now-misleading comment around ghost-point overlap iteration. |
| src/post_process/m_mpi_proxy.fpp | Adds MPI broadcast for particle_cloud(i)%... fields needed in post-process. |
| src/post_process/m_global_parameters.fpp | Initializes particle-cloud defaults and adjusts num_ibs to include particle-cloud particles for IB-state reading. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| #:for VAR in ['x_centroid', 'y_centroid', 'z_centroid', 'length_x', 'length_y', 'length_z', & | ||
| & 'radius', 'mass', 'min_spacing'] | ||
| call MPI_BCAST(particle_cloud(i)%${VAR}$, 1, mpi_p, 0, MPI_COMM_WORLD, ierr) |
| ! Particle clouds expand into individual IB patches at simulation startup, so num_ibs as read | ||
| ! from the case file counts only the namelist patches. Match the global count the simulation | ||
| ! arrives at (s_reduce_ib_patch_array) so the IB state records can be read back. | ||
| do i = 1, num_particle_clouds | ||
| num_ibs = num_ibs + particle_cloud(i)%num_particles | ||
| end do |
|
Claude Code Review Head SHA: f620a4f Files changed:
Findings:
|
Description
Branch created to debug some issues I was having with particles not colliding with one of the domain boundaries when slip wall was used. The solution wound up being that the variable populating slip wall BC at the top of the boundary was not populated on the GPU. Updates have been made.
While I was in the code, I also noticed that
ib_state_wrtwill not trigger in post-process is all IBs are from particle_clouds. This is because when it checks for the number of IBs to create the array, it was not including cloud particles, and therefore generated 0-lengthed arrays. I added the particle cloud count to this check, allowing it to store more IB information for output.Type of change (delete unused ones)
Testing
I generated a 2D, 2000 particle case as:
This case was run on an RTX 2080 Super with NVHPC/23.11
Checklist
Check these like this
[x]to indicate which of the below applies.